﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using ElectronicCommerce.Framework.Payment.Contract.DataContract.Common;

namespace ElectronicCommerce.Framework.Payment.Contract.DataContract
{
    /// <summary>
    /// 支付请求
    /// </summary>
    [Serializable]
    [DataContract]
    public class PaymentResult
    {
        public PaymentResult()
            : this("", "")
        {
        }

        public PaymentResult(string paymentName)
            : this(paymentName, "")
        {
        }

        public PaymentResult(string paymentName, string gatewayAddress)
        {
            Gateway = new Gateway(paymentName, gatewayAddress);
            this.ResponseText = "";
            this.ResponseDate = DateTime.Now;
        }

        /// <summary>
        /// 用什么类型网关支付
        /// </summary>
        [DataMember]
        public Gateway Gateway { get; set; }

        /// <summary>
        /// 响应文本
        /// </summary>
        [DataMember]
        public string ResponseText { get; set; }

        /// <summary>
        /// 响应日期
        /// </summary>
        [DataMember]
        public DateTime ResponseDate { get; set; }
    }
}
